//
//  PersonViewModel.h
//  MVVMTest
//
//  Created by WestWood on 2019/2/20.
//  Copyright © 2019 WestWood. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "Person.h"

NS_ASSUME_NONNULL_BEGIN

@protocol PersonViewModelDelegate <NSObject>

@required
- (void)personHadChange:(Person *)person;

@end


@interface PersonViewModel : NSObject

- (instancetype)initWithPerson;

- (instancetype)initWithPerson: (Person *)person;

@property (nonatomic, readonly) Person *person;

@property (nonatomic, readonly) NSString *nameText;
@property (nonatomic, readonly) NSString *birthdateText;
@property (nonatomic, assign) id<PersonViewModelDelegate> delegate;

- (void)changePersonFirstName;
- (void)changePersonLastName: (NSString *)lastName;

@end

NS_ASSUME_NONNULL_END
